<?php

namespace App\Http\Requests;

class LoginRequest extends BaseRequest {
    /**
     * Get the validation rules that apply to the request.
     * @return string[]
     */
    public function rules(): array
    {
        return [
            'username' => 'required',
            'password' => 'required',
        ];
    }

    public function messages(): array
    {
        return [
            'username.required' => '用户名不能为空。',
            'password.unique' => ' 密码不能为空',
        ];
    }
}
